home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / emacs-19.000 / emacs-19 / usr / local / info / emacs-10 < prev    next >
Encoding:
GNU Info File  |  1995-09-11  |  47.7 KB  |  1,146 lines

  1. This is Info file ../info/emacs, produced by Makeinfo-1.55 from the
  2. input file emacs.texi.
  3.  
  4. 
  5. File: emacs,  Node: Outline Visibility,  Next: Outline Views,  Prev: Outline Motion,  Up: Outline Mode
  6.  
  7. Outline Visibility Commands
  8. ---------------------------
  9.  
  10.    The other special commands of outline mode are used to make lines
  11. visible or invisible.  Their names all start with `hide' or `show'.
  12. Most of them fall into pairs of opposites.  They are not undoable;
  13. instead, you can undo right past them.  Making lines visible or
  14. invisible is simply not recorded by the undo mechanism.
  15.  
  16. `C-c C-t'
  17.      Make all body lines in the buffer invisible (`hide-body').
  18.  
  19. `C-c C-a'
  20.      Make all lines in the buffer visible (`show-all').
  21.  
  22. `C-c C-d'
  23.      Make everything under this heading invisible, not including this
  24.      heading itself
  25.      (`hide-subtree').
  26.  
  27. `C-c C-s'
  28.      Make everything under this heading visible, including body,
  29.      subheadings, and their bodies (`show-subtree').
  30.  
  31. `C-c C-l'
  32.      Make the body of this heading line, and of all its subheadings,
  33.      invisible (`hide-leaves').
  34.  
  35. `C-c C-k'
  36.      Make all subheadings of this heading line, at all levels, visible
  37.      (`show-branches').
  38.  
  39. `C-c C-i'
  40.      Make immediate subheadings (one level down) of this heading line
  41.      visible (`show-children').
  42.  
  43. `C-c C-c'
  44.      Make this heading line's body invisible (`hide-entry').
  45.  
  46. `C-c C-e'
  47.      Make this heading line's body visible (`show-entry').
  48.  
  49. `C-c C-q'
  50.      Hide everything except the top N levels of heading lines
  51.      (`hide-sublevels').
  52.  
  53. `C-c C-o'
  54.      Hide everything except for the heading or body that point is in,
  55.      plus the headings leading up from there to the top level of the
  56.      outline (`hide-other').
  57.  
  58.    Two commands that are exact opposites are `C-c C-c' (`hide-entry')
  59. and `C-c C-e' (`show-entry').  They are used with point on a heading
  60. line, and apply only to the body lines of that heading.  Subheadings
  61. and their bodies are not affected.
  62.  
  63.    Two more powerful opposites are `C-c C-d' (`hide-subtree') and `C-c
  64. C-s' (`show-subtree').  Both expect to be used when point is on a
  65. heading line, and both apply to all the lines of that heading's
  66. "subtree": its body, all its subheadings, both direct and indirect, and
  67. all of their bodies.  In other words, the subtree contains everything
  68. following this heading line, up to and not including the next heading of
  69. the same or higher rank.
  70.  
  71.    Intermediate between a visible subtree and an invisible one is having
  72. all the subheadings visible but none of the body.  There are two
  73. commands for doing this, depending on whether you want to hide the
  74. bodies or make the subheadings visible.  They are `C-c C-l'
  75. (`hide-leaves') and `C-c C-k' (`show-branches').
  76.  
  77.    A little weaker than `show-branches' is `C-c C-i' (`show-children').
  78. It makes just the direct subheadings visible--those one level down.
  79. Deeper subheadings remain invisible, if they were invisible.
  80.  
  81.    Two commands have a blanket effect on the whole file.  `C-c C-t'
  82. (`hide-body') makes all body lines invisible, so that you see just the
  83. outline structure.  `C-c C-a' (`show-all') makes all lines visible.
  84. These commands can be thought of as a pair of opposites even though
  85. `C-c C-a' applies to more than just body lines.
  86.  
  87.    The command `C-c C-q' (`hide-sublevels') hides all but the top level
  88. headings.  With a numeric argument N, it hides everything except the
  89. top N levels of heading lines.
  90.  
  91.    The command `C-c C-o' (`hide-other') hides everything except the
  92. heading or body text that point is in, plus its parents (the headers
  93. leading up from there to top level in the outline).
  94.  
  95.    You can turn off the use of ellipses at the ends of visible lines by
  96. setting `selective-display-ellipses' to `nil'.  Then there is no
  97. visible indication of the presence of invisible lines.
  98.  
  99. 
  100. File: emacs,  Node: Outline Views,  Prev: Outline Visibility,  Up: Outline Mode
  101.  
  102. Viewing One Outline in Multiple Views
  103. -------------------------------------
  104.  
  105.    You can display two views of a single outline at the same time, in
  106. different windows, by means of an alternative implementation of Outline
  107. mode called `noutline'.
  108.  
  109.    To do this, first load the library `noutline' with `M-x load-library
  110. RET noutline RET'.  This loads the alternative implementation of
  111. Outline mode.  It provides the same command names and key bindings as
  112. regular Outline mode, but it implements them differently.
  113.  
  114.    Then, to display a second view of an outline buffer, you must create
  115. an indirect buffer using `M-x make-indirect-buffer'.  The first
  116. argument of this command is the existing outline buffer name, and its
  117. second argument is the name to use for the new indirect buffer.  *Note
  118. Indirect Buffers::.
  119.  
  120.    Once the indirect buffer exists, you can display it in a window in
  121. the normal fashion, with `C-x 4 b' or other Emacs commands.  The Outline
  122. mode commands to show and hide parts of the text operate on each buffer
  123. independently; as a result, each buffer can have its own view.  If you
  124. want more than two views on the same outline, create additional indirect
  125. buffers.
  126.  
  127.    In a future Emacs version, the alternative `noutline' implementation
  128. will probably become the principal implementation.
  129.  
  130. 
  131. File: emacs,  Node: TeX Mode,  Next: Nroff Mode,  Prev: Outline Mode,  Up: Text
  132.  
  133. TeX Mode
  134. ========
  135.  
  136.    TeX is a powerful text formatter written by Donald Knuth; it is also
  137. free, like GNU Emacs.  LaTeX is a simplified input format for TeX,
  138. implemented by TeX macros; it comes with TeX.  SliTeX is a special form
  139. of LaTeX.
  140.  
  141.    Emacs has a special TeX mode for editing TeX input files.  It
  142. provides facilities for checking the balance of delimiters and for
  143. invoking TeX on all or part of the file.
  144.  
  145.    TeX mode has three variants, Plain TeX mode, LaTeX mode, and SliTeX
  146. mode (these three distinct major modes differ only slightly).  They are
  147. designed for editing the three different formats.  The command `M-x
  148. tex-mode' looks at the contents of the buffer to determine whether the
  149. contents appear to be either LaTeX input or SliTeX input; if so, it
  150. selects the appropriate mode.  If the file contents do not appear to be
  151. LaTeX or SliTeX, it selects Plain TeX mode.  If the contents are
  152. insufficient to determine this, the variable `tex-default-mode'
  153. controls which mode is used.
  154.  
  155.    When `M-x tex-mode' does not guess right, you can use the commands
  156. `M-x plain-tex-mode', `M-x latex-mode', and `M-x slitex-mode' to select
  157. explicitly the particular variants of TeX mode.
  158.  
  159. * Menu:
  160.  
  161. * Editing: TeX Editing.   Special commands for editing in TeX mode.
  162. * LaTeX: LaTeX Editing.   Additional commands for LaTeX input files.
  163. * Printing: TeX Print.    Commands for printing part of a file with TeX.
  164. * Getting: TeX Distrib.   Getting the latest Unix TeX distribution.
  165.  
  166. 
  167. File: emacs,  Node: TeX Editing,  Next: LaTeX Editing,  Up: TeX Mode
  168.  
  169. TeX Editing Commands
  170. --------------------
  171.  
  172.    Here are the special commands provided in TeX mode for editing the
  173. text of the file.
  174.  
  175. `"'
  176.      Insert, according to context, either ```' or `"' or `'''
  177.      (`tex-insert-quote').
  178.  
  179. `LFD'
  180.      Insert a paragraph break (two newlines) and check the previous
  181.      paragraph for unbalanced braces or dollar signs
  182.      (`tex-terminate-paragraph').
  183.  
  184. `M-x validate-tex-region'
  185.      Check each paragraph in the region for unbalanced braces or dollar
  186.      signs.
  187.  
  188. `C-c {'
  189.      Insert `{}' and position point between them (`tex-insert-braces').
  190.  
  191. `C-c }'
  192.      Move forward past the next unmatched close brace (`up-list').
  193.  
  194.    In TeX, the character `"' is not normally used; we use ```' to start
  195. a quotation and `''' to end one.  To make editing easier under this
  196. formatting convention, TeX mode overrides the normal meaning of the key
  197. `"' with a command that inserts a pair of single-quotes or backquotes
  198. (`tex-insert-quote').  To be precise, this command inserts ```' after
  199. whitespace or an open brace, `"' after a backslash, and `''' after any
  200. other character.
  201.  
  202.    If you need the character `"' itself in unusual contexts, use `C-q'
  203. to insert it.  Also, `"' with a numeric argument always inserts that
  204. number of `"' characters.
  205.  
  206.    In TeX mode, `$' has a special syntax code which attempts to
  207. understand the way TeX math mode delimiters match.  When you insert a
  208. `$' that is meant to exit math mode, the position of the matching `$'
  209. that entered math mode is displayed for a second.  This is the same
  210. feature that displays the open brace that matches a close brace that is
  211. inserted.  However, there is no way to tell whether a `$' enters math
  212. mode or leaves it; so when you insert a `$' that enters math mode, the
  213. previous `$' position is shown as if it were a match, even though they
  214. are actually unrelated.
  215.  
  216.    TeX uses braces as delimiters that must match.  Some users prefer to
  217. keep braces balanced at all times, rather than inserting them singly.
  218. Use `C-c {' (`tex-insert-braces') to insert a pair of braces.  It
  219. leaves point between the two braces so you can insert the text that
  220. belongs inside.  Afterward, use the command `C-c }' (`up-list') to move
  221. forward past the close brace.
  222.  
  223.    There are two commands for checking the matching of braces.  LFD
  224. (`tex-terminate-paragraph') checks the paragraph before point, and
  225. inserts two newlines to start a new paragraph.  It prints a message in
  226. the echo area if any mismatch is found.  `M-x validate-tex-region'
  227. checks a region, paragraph by paragraph.  When it finds a paragraph that
  228. contains a mismatch, it displays point at the beginning of the paragraph
  229. for a few seconds and sets the mark at that spot.  Scanning continues
  230. until the whole buffer has been checked or until you type another key.
  231. Afterward, you can use the mark ring to find the last several paragraphs
  232. that had mismatches (*note Mark Ring::.).
  233.  
  234.    Note that Emacs commands count square brackets and parentheses in
  235. TeX mode, not just braces.  This is not strictly correct for the
  236. purpose of checking TeX syntax.  However, parentheses and square
  237. brackets are likely to be used in text as matching delimiters and it is
  238. useful for the various motion commands and automatic match display to
  239. work with them.
  240.  
  241. 
  242. File: emacs,  Node: LaTeX Editing,  Next: TeX Print,  Prev: TeX Editing,  Up: TeX Mode
  243.  
  244. LaTeX Editing Commands
  245. ----------------------
  246.  
  247.    LaTeX mode, and its variant, SliTeX mode, provide a few extra
  248. features not applicable to plain TeX.
  249.  
  250. `C-c C-o'
  251.      Insert `\begin' and `\end' for LaTeX block and position point on a
  252.      line between them. (`tex-latex-block').
  253.  
  254. `C-c C-e'
  255.      Close the last unended block for LaTeX (`tex-close-latex-block').
  256.  
  257.    In LaTeX input, `\begin' and `\end' commands are used to group
  258. blocks of text.  To insert a `\begin' and a matching `\end' (on a new
  259. line following the `\begin'), use `C-c C-o' (`tex-latex-block').  A
  260. blank line is inserted between the two, and point is left there.  You
  261. can use completion when you enter the block type; to specify additional
  262. block type names beyond the standard list, set the variable
  263. `latex-block-names'.  For example, here's how to add `theorem',
  264. `corollary', and `proof':
  265.  
  266.      (setq latex-block-names '("theorem" "corollary" "proof"))
  267.  
  268.    In LaTeX input, `\begin' and `\end' commands must balance.  You can
  269. use `C-c C-e' (`tex-close-latex-block') to insert automatically a
  270. matching `\end' to match the last unmatched `\begin'.  It indents the
  271. `\end' to match the corresponding `\begin'.  It inserts a newline after
  272. `\end' if point is at the beginning of a line.
  273.  
  274. 
  275. File: emacs,  Node: TeX Print,  Next: TeX Distrib,  Prev: LaTeX Editing,  Up: TeX Mode
  276.  
  277. TeX Printing Commands
  278. ---------------------
  279.  
  280.    You can invoke TeX as an inferior of Emacs on either the entire
  281. contents of the buffer or just a region at a time.  Running TeX in this
  282. way on just one chapter is a good way to see what your changes look
  283. like without taking the time to format the entire file.
  284.  
  285. `C-c C-r'
  286.      Invoke TeX on the current region, together with the buffer's header
  287.      (`tex-region').
  288.  
  289. `C-c C-b'
  290.      Invoke TeX on the entire current buffer (`tex-buffer').
  291.  
  292. `C-c TAB'
  293.      Invoke BibTeX on the current file (`tex-bibtex-file').
  294.  
  295. `C-c C-f'
  296.      Invoke TeX on the current file (`tex-file').
  297.  
  298. `C-c C-l'
  299.      Recenter the window showing output from the inferior TeX so that
  300.      the last line can be seen (`tex-recenter-output-buffer').
  301.  
  302. `C-c C-k'
  303.      Kill the TeX subprocess (`tex-kill-job').
  304.  
  305. `C-c C-p'
  306.      Print the output from the last `C-c C-r', `C-c C-b', or `C-c C-f'
  307.      command (`tex-print').
  308.  
  309. `C-c C-v'
  310.      Preview the output from the last `C-c C-r', `C-c C-b', or `C-c
  311.      C-f' command (`tex-view').
  312.  
  313. `C-c C-q'
  314.      Show the printer queue (`tex-show-print-queue').
  315.  
  316.    You can pass the current buffer through an inferior TeX by means of
  317. `C-c C-b' (`tex-buffer').  The formatted output appears in a temporary
  318. file; to print it, type `C-c C-p' (`tex-print').  Afterward, you can
  319. use `C-c C-q' (`tex-show-print-queue') to view the progress of your
  320. output towards being printed.  If your terminal has the ability to
  321. display TeX output files, you can preview the output on the terminal
  322. with `C-c C-v' (`tex-view').
  323.  
  324.    You can specify the directory to use for running TeX by setting the
  325. variable `tex-directory'.  `"."' is the default value.  If your
  326. environment variable `TEXINPUTS' contains relative directory names, or
  327. if your files contains `\input' commands with relative file names, then
  328. `tex-directory' *must* be `"."' or you will get the wrong results.
  329. Otherwise, it is safe to specify some other directory, such as `"/tmp"'.
  330.  
  331.    If you want to specify which shell commands are used in the inferior
  332. TeX, you can do so by setting the values of the variables
  333. `tex-run-command', `latex-run-command', `slitex-run-command',
  334. `tex-dvi-print-command', `tex-dvi-view-command', and
  335. `tex-show-queue-command'.  You *must* set the value of
  336. `tex-dvi-view-command' for your particular terminal; this variable has
  337. no default value.  The other variables have default values that may (or
  338. may not) be appropriate for your system.
  339.  
  340.    Normally, the file name given to these commands comes at the end of
  341. the command string; for example, `latex FILENAME'.  In some cases,
  342. however, the file name needs to be embedded in the command; an example
  343. is when you need to provide the file name as an argument to one command
  344. whose output is piped to another.  You can specify where to put the
  345. file name with `*' in the command string.  For example,
  346.  
  347.      (setq tex-dvi-print-command "dvips -f * | lpr")
  348.  
  349.    The terminal output from TeX, including any error messages, appears
  350. in a buffer called `*tex-shell*'.  If TeX gets an error, you can switch
  351. to this buffer and feed it input (this works as in Shell mode; *note
  352. Interactive Shell::.).  Without switching to this buffer you can scroll
  353. it so that its last line is visible by typing `C-c C-l'.
  354.  
  355.    Type `C-c C-k' (`tex-kill-job') to kill the TeX process if you see
  356. that its output is no longer useful.  Using `C-c C-b' or `C-c C-r' also
  357. kills any TeX process still running.
  358.  
  359.    You can also pass an arbitrary region through an inferior TeX by
  360. typing `C-c C-r' (`tex-region').  This is tricky, however, because most
  361. files of TeX input contain commands at the beginning to set parameters
  362. and define macros, without which no later part of the file will format
  363. correctly.  To solve this problem, `C-c C-r' allows you to designate a
  364. part of the file as containing essential commands; it is included before
  365. the specified region as part of the input to TeX.  The designated part
  366. of the file is called the "header".
  367.  
  368.    To indicate the bounds of the header in Plain TeX mode, you insert
  369. two special strings in the file.  Insert `%**start of header' before the
  370. header, and `%**end of header' after it.  Each string must appear
  371. entirely on one line, but there may be other text on the line before or
  372. after.  The lines containing the two strings are included in the header.
  373. If `%**start of header' does not appear within the first 100 lines of
  374. the buffer, `C-c C-r' assumes that there is no header.
  375.  
  376.    In LaTeX mode, the header begins with `\documentstyle' and ends with
  377. `\begin{document}'.  These are commands that LaTeX requires you to use
  378. in any case, so nothing special needs to be done to identify the header.
  379.  
  380.    The commands (`tex-buffer') and (`tex-region') do all of their work
  381. in a temporary directory, and do not have available any of the auxiliary
  382. files needed by TeX for cross-references; these commands are generally
  383. not suitable for running the final copy in which all of the
  384. cross-references need to be correct.  When you want the auxiliary
  385. files, use `C-c C-f' (`tex-file') which runs TeX on the current
  386. buffer's file, in that file's directory.  Before TeX runs, you will be
  387. asked about saving any modified buffers.  Generally, you need to use
  388. (`tex-file') twice to get cross-references correct.
  389.  
  390.    For LaTeX files, you can use BibTeX to process the auxiliary file
  391. for the current buffer's file.  BibTeX looks up bibliographic citations
  392. in a data base and prepares the cited references for the bibliography
  393. section.  The command `C-c TAB' (`tex-bibtex-file') runs the shell
  394. command (`tex-bibtex-command') to produce a `.bbl' file for the current
  395. buffer's file.  Generally, you need to do `C-c C-f' (`tex-file') once
  396. to generate the `.aux' file, then do `C-c TAB' (`tex-bibtex-file'), and
  397. then repeat `C-c C-f' (`tex-file') twice more to get the
  398. cross-references correct.
  399.  
  400.    Entering any kind of TeX mode runs the hooks `text-mode-hook' and
  401. `tex-mode-hook'.  Then it runs either `plain-tex-mode-hook' or
  402. `latex-mode-hook', whichever is appropriate.  For SliTeX files, it
  403. calls `slitex-mode-hook'.  Starting the TeX shell runs the hook
  404. `tex-shell-hook'.  *Note Hooks::.
  405.  
  406. 
  407. File: emacs,  Node: TeX Distrib,  Prev: TeX Print,  Up: TeX Mode
  408.  
  409. Unix TeX Distribution
  410. ---------------------
  411.  
  412.    TeX for Unix systems can be obtained from the University of
  413. Washington for a distribution fee.
  414.  
  415.    To order a full distribution, specify whether you prefer 1/4 inch
  416. QIC-24 or 4mm DAT tape (9-track reel-to-reel is no longer available)
  417. and send $210.00 for a (tar or cpio) cartridge, payable to the
  418. University of Washington to:
  419.  
  420.      Pierre MacKay
  421.      Department of Classics
  422.      Denny Hall, Mail Stop DH-10
  423.      University of Washington
  424.      Seattle, Washington 98195
  425.  
  426. Purchase orders are acceptable, but there is an extra charge of $10.00,
  427. to pay for processing charges.
  428.  
  429. For overseas orders please add $20.00 to the base cost for shipment via
  430. air parcel post, or $30.00 for shipment via courier.
  431.  
  432.    The normal distribution is a tar tape, blocked 20, 1600 bpi, on an
  433. industry standard 2400 foot half-inch reel.  The physical format for the
  434. 1/4 inch streamer cartridges is QIC-24.  System V tapes can be written
  435. in cpio format, blocked 5120 bytes, with ASCII headers.
  436.  
  437. 
  438. File: emacs,  Node: Nroff Mode,  Next: Formatted Text,  Prev: TeX Mode,  Up: Text
  439.  
  440. Nroff Mode
  441. ==========
  442.  
  443.    Nroff mode is a mode like Text mode but modified to handle nroff
  444. commands present in the text.  Invoke `M-x nroff-mode' to enter this
  445. mode.  It differs from Text mode in only a few ways.  All nroff command
  446. lines are considered paragraph separators, so that filling will never
  447. garble the nroff commands.  Pages are separated by `.bp' commands.
  448. Comments start with backslash-doublequote.  Also, three special
  449. commands are provided that are not in Text mode:
  450.  
  451. `M-n'
  452.      Move to the beginning of the next line that isn't an nroff command
  453.      (`forward-text-line').  An argument is a repeat count.
  454.  
  455. `M-p'
  456.      Like `M-n' but move up (`backward-text-line').
  457.  
  458. `M-?'
  459.      Prints in the echo area the number of text lines (lines that are
  460.      not nroff commands) in the region (`count-text-lines').
  461.  
  462.    The other feature of Nroff mode is that you can turn on Electric
  463. Nroff mode.  This is a minor mode that you can turn on or off with `M-x
  464. electric-nroff-mode' (*note Minor Modes::.).  When the mode is on, each
  465. time you use RET to end a line that contains an nroff command that
  466. opens a kind of grouping, the matching nroff command to close that
  467. grouping is automatically inserted on the following line.  For example,
  468. if you are at the beginning of a line and type `. ( b RET', this
  469. inserts the matching command `.)b' on a new line following point.
  470.  
  471.    If you use Outline minor mode with Nroff mode (*note Outline
  472. Mode::.), heading lines are lines of the form `.H' followed by a number
  473. (the header level).
  474.  
  475.    Entering Nroff mode runs the hook `text-mode-hook', followed by the
  476. hook `nroff-mode-hook' (*note Hooks::.).
  477.  
  478. 
  479. File: emacs,  Node: Formatted Text,  Prev: Nroff Mode,  Up: Text
  480.  
  481. Editing Formatted Text
  482. ======================
  483.  
  484.    "Enriched mode" is a minor mode for editing files that contain
  485. formatted text in WYSIWYG fashion, as in a word processor.  Currently,
  486. formatted text in Enriched mode can specify fonts, colors, underlining,
  487. margins, and types of filling and justification.  In the future, we plan
  488. to implement other formatting features as well.
  489.  
  490.    Enriched mode is a minor mode (*note Minor Modes::.).  Typically it
  491. is used in conjunction with Text mode (*note Text Mode::.).  However,
  492. you can also use it with other major modes such as Outline mode and
  493. Indented Text mode.
  494.  
  495.    Potentially, Emacs can store formatted text files in various file
  496. formats.  Currently, only one format is implemented: "text/enriched"
  497. format, which is defined by the MIME protocol.  *Note Format
  498. Conversion: (elisp)Format Conversion, for details of how Emacs
  499. recognizes and converts file formats.
  500.  
  501.    The Emacs distribution contains a formatted text file that can serve
  502. as an example.  Its name is `etc/enriched.doc'.  It contains samples
  503. illustrating all the features described in this section.  It also
  504. contains a list of ideas for future enhancements.
  505.  
  506. * Menu:
  507.  
  508. * Requesting Formatted Text::   Entering and exiting Enriched mode.
  509. * Hard and Soft Newlines::      There are two different kinds of newlines.
  510. * Editing Format Info::         How to edit text properties.
  511. * Faces: Format Faces.          Bold, italic, underline, etc.
  512. * Color: Format Colors.         Changing the color of text.
  513. * Indent: Format Indentation.   Changing the left and right margins.
  514. * Justification: Format Justification.
  515.                                 Centering, setting text flush with the
  516.                                   left or right margin, etc.
  517. * Other: Format Properties.     The "special" text properties submenu.
  518. * Forcing Enriched Mode::       How to force use of Enriched mode.
  519.  
  520. 
  521. File: emacs,  Node: Requesting Formatted Text,  Next: Hard and Soft Newlines,  Up: Formatted Text
  522.  
  523. Requesting to Edit Formatted Text
  524. ---------------------------------
  525.  
  526.    Whenever you visit a file that Emacs saved in the text/enriched
  527. format, Emacs automatically converts the formatting information in the
  528. file into Emacs's own internal format (text properties), and turns on
  529. Enriched mode.
  530.  
  531.    To create a new file of formatted text, first visit the nonexistent
  532. file, then type `M-x enriched-mode' before you start inserting text.
  533. This command turns on Enriched mode.  Do this before you begin inserting
  534. text, to ensure that the text you insert is handled properly.
  535.  
  536.    More generally, the command `enriched-mode' turns Enriched mode on
  537. if it was off, and off if it was on.  With a prefix argument, this
  538. command turns Enriched mode on if the argument is positive, and turns
  539. the mode off otherwise.
  540.  
  541.    When you save a buffer while Enriched mode is enabled in it, Emacs
  542. automatically converts the text to text/enriched format while writing it
  543. into the file.  When you visit the file again, Emacs will automatically
  544. recognize the format, reconvert the text, and turn on Enriched mode
  545. again.
  546.  
  547.    Normally, after reading a file in text/enriched format, Emacs refills
  548. each paragraph to fit the width of the window.  You can turn off this
  549. refilling, to save time, by setting the variable
  550. `enriched-fill-after-visiting' to `nil' or to `ask'.
  551.  
  552.    In any case, if the window width is the same as the width with which
  553. the file was saved, Emacs trusts that the file is already properly
  554. filled.
  555.  
  556.    You can add annotations for saving additional text properties, which
  557. Emacs normally does not save, by adding to `enriched-translations'.
  558. Note that the text/enriched standard requires any non-standard
  559. annotations to have names starting with `x-', as in `x-read-only'.
  560. This ensures that they will not conflict with standard annotations that
  561. may be added later.
  562.  
  563. 
  564. File: emacs,  Node: Hard and Soft Newlines,  Next: Editing Format Info,  Prev: Requesting Formatted Text,  Up: Formatted Text
  565.  
  566. Hard and Soft Newlines
  567. ----------------------
  568.  
  569.    In formatted text, Emacs distinguishes between two different kinds of
  570. newlines, "hard" newlines and "soft" newlines.
  571.  
  572.    Hard newlines are used to separate paragraphs, or items in a list, or
  573. anywhere that there should always be a line break regardless of the
  574. margins.  The `RET' command (`newline') and `C-o' (`open-line') insert
  575. hard newlines.
  576.  
  577.    Soft newlines are used to make text fit between the margins.  All the
  578. fill commands, including Auto Fill, insert soft newlines--and they
  579. delete only soft newlines.
  580.  
  581.    Although hard and soft newlines look the same, it is important to
  582. bear the difference in mind.  Do not use RET to break lines in the
  583. middle of filled paragraphs, or else you will get hard newlines that are
  584. barriers to further filling.  Instead, let Auto Fill mode break lines,
  585. so that if the text or the margins change, Emacs can refill the lines
  586. properly.  *Note Auto Fill::.
  587.  
  588.    On the other hand, in tables and lists, where the lines should always
  589. remain as you type them, you can use RET to end lines.  For these
  590. lines, you may also want to set the justification style to `unfilled'.
  591. *Note Format Justification::.
  592.  
  593. 
  594. File: emacs,  Node: Editing Format Info,  Next: Format Faces,  Prev: Hard and Soft Newlines,  Up: Formatted Text
  595.  
  596. Editing Format Information
  597. --------------------------
  598.  
  599.    There are two ways to alter the formatting information for a
  600. formatted text file: with keyboard commands, and with the mouse.
  601.  
  602.    The easiest way to add properties to your document is by using the
  603. Text Properties menu.  You can get to this menu in two ways: from the
  604. Edit menu in the menu bar, or with `C-mouse-2' (hold the CTRL key and
  605. press the middle mouse button).
  606.  
  607.    Most of the items in the Text Properties menu lead to other submenus.
  608. These are described in the sections that follow.  Some items run
  609. commands directly:
  610.  
  611. `Remove Properties'
  612.      Delete from the region all the text properties that the Text
  613.      Properties menu works with (`facemenu-remove-props').
  614.  
  615. `Remove All'
  616.      Delete *all* text properties from the region
  617.      (`facemenu-remove-all').
  618.  
  619. `List Properties'
  620.      List all the text properties of the character following point
  621.      (`list-text-properties-at').
  622.  
  623. `Display Faces'
  624.      Display a list of all the defined faces.
  625.  
  626. `Display Colors'
  627.      Display a list of all the defined colors.
  628.  
  629. 
  630. File: emacs,  Node: Format Faces,  Next: Format Colors,  Prev: Editing Format Info,  Up: Formatted Text
  631.  
  632. Faces in Formatted Text
  633. -----------------------
  634.  
  635.    The Faces submenu lists various Emacs faces including `bold',
  636. `italic', and `underline'.  Selecting one of these adds the chosen face
  637. to the region.  *Note Faces::.  You can also specify a face with these
  638. keyboard commands:
  639.  
  640. `M-g d'
  641.      Set the region, or the next inserted character, to the `default'
  642.      face (`facemenu-set-default').
  643.  
  644. `M-g b'
  645.      Set the region, or the next inserted character, to the `bold' face
  646.      (`facemenu-set-bold').
  647.  
  648. `M-g i'
  649.      Set the region, or the next inserted character, to the `italic'
  650.      face (`facemenu-set-italic').
  651.  
  652. `M-g l'
  653.      Set the region, or the next inserted character, to the
  654.      `bold-italic' face (`facemenu-set-bold-italic').
  655.  
  656. `M-g u'
  657.      Set the region, or the next inserted character, to the `underline'
  658.      face (`facemenu-set-underline').
  659.  
  660. `M-g o FACE RET'
  661.      Set the region, or the next inserted character, to the face FACE
  662.      (`facemenu-set-face').
  663.  
  664.    If you use these commands with a prefix argument--or, in Transient
  665. Mark mode, if the region is not active--then these commands specify a
  666. face to use for your next self-inserting input.  *Note Transient
  667. Mark::.  This applies to both the keyboard commands and the menu
  668. commands.
  669.  
  670.    Enriched mode defines two additional faces: `excerpt' and `fixed'.
  671. These correspond to codes used in the text/enriched file format.
  672.  
  673.    The `excerpt' face is intended for quotations.  This face is the
  674. same as `italic' unless you customize it (*note Modifying Faces::.).
  675.  
  676.    The `fixed' face is meant to say, "Use a fixed-width font for this
  677. part of the text."  Emacs currently supports only fixed-width fonts;
  678. therefore, the `fixed' annotation is not necessary now.  However, we
  679. plan to support variable width fonts in future Emacs versions, and
  680. other systems that display text/enriched format may not use a
  681. fixed-width font as the default.  So if you specifically want a certain
  682. part of the text to use a fixed-width font, you should specify the
  683. `fixed' face for that part.
  684.  
  685.    The `fixed' face is normally defined to use a different font from
  686. the default.  However, systems have different fonts installed, you may
  687. need to customize this.
  688.  
  689.    If your terminal cannot display different faces, you will not be able
  690. to see them, but you can still edit documents containing faces.  You can
  691. even add faces and colors to documents.  They will be visible when the
  692. file is viewed on a terminal that can display them.
  693.  
  694. 
  695. File: emacs,  Node: Format Colors,  Next: Format Indentation,  Prev: Format Faces,  Up: Formatted Text
  696.  
  697. Colors in Formatted Text
  698. ------------------------
  699.  
  700.    You can specify foreground and background colors for portions of the
  701. text.  There is a menu for specifying the foreground color and a menu
  702. for specifying the background color.  Each color menu lists all the
  703. colors that you have used in Enriched mode in the current Emacs session.
  704.  
  705.    If you specify a color with a prefix argument--or, in Transient Mark
  706. mode, if the region is not active--then it applies to your next
  707. self-inserting input.  *Note Transient Mark::.  Otherwise, the command
  708. applies to the region.
  709.  
  710.    Each color menu contains one additional item: `Other'.  You can use
  711. this item to specify a color that is not listed in the menu; it reads
  712. the color name with the minibuffer.  To display list of available colors
  713. and their names, use the `Display Colors' menu item in the Text
  714. Properties menu (*note Editing Format Info::.).
  715.  
  716.    Any color that you specify in this way, or that is mentioned in a
  717. formatted text file that you read in, is added to both color menus for
  718. the duration of the Emacs session.
  719.  
  720.    There are no key bindings for specifying colors, but you can do so
  721. with the extended commands `M-x facemenu-set-foreground' and `M-x
  722. facemenu-set-background'.  Both of these commands read the name of the
  723. color with the minibuffer.
  724.  
  725. 
  726. File: emacs,  Node: Format Indentation,  Next: Format Justification,  Prev: Format Colors,  Up: Formatted Text
  727.  
  728. Indentation in Formatted Text
  729. -----------------------------
  730.  
  731.    When editing formatted text, you can specify different amounts of
  732. indentation for the right or left margin of an entire paragraph or a
  733. part of a paragraph.  The margins you specify automatically affect the
  734. Emacs fill commands (*note Filling::.) and line-breaking commands.
  735.  
  736.    The Indentation submenu provides a convenient interface for
  737. specifying these properties.  The submenu contains four items:
  738.  
  739. `Indent More'
  740.      Indent the region by 4 columns (`increase-left-margin').  In
  741.      Enriched mode, this command is also available on `C-x TAB'; if you
  742.      supply a numeric argument, that says how many columns to add to the
  743.      margin (a negative argument reduces the number of columns).
  744.  
  745. `Indent Less'
  746.      Remove 4 columns of indentation from the region.
  747.  
  748. `Indent Right More'
  749.      Make the text narrower by indenting 4 columns at the right margin.
  750.  
  751. `Indent Right Less'
  752.      Remove 4 columns of indentation from the right margin.
  753.  
  754.    You can use these commands repeatedly to increase or decrease the
  755. indentation.
  756.  
  757.    The most common way to use these commands is to change the
  758. indentation of an entire paragraph.  However, that is not the only use.
  759. You can change the margins at any point; the new values take effect at
  760. the end of the line (for right margins) or the beginning of the next
  761. line (for left margins).
  762.  
  763.    This makes it possible to format paragraphs with "hanging indents",
  764. which means that the first line is indented less than subsequent lines.
  765. To set up a hanging indent, increase the indentation of the region
  766. starting after the first word of the paragraph and running until the end
  767. of the paragraph.
  768.  
  769.    Indenting the first line of a paragraph is easier.  Set the margin
  770. for the whole paragraph where you want it to be for the body of the
  771. paragraph, then indent the first line by inserting extra spaces or tabs.
  772.  
  773.    Sometimes, as a result of editing, the filling of a paragraph becomes
  774. messed up--parts of the paragraph may extend past the left or right
  775. margins.  When this happens, use `M-q' (`fill-paragraph') to refill the
  776. paragraph.
  777.  
  778.    The variable `standard-indent' specifies how many columns these
  779. commands should add to or subtract from the indentation.  The default
  780. value is 4.
  781.  
  782.    Enriched mode automatically sets the variable `fill-column' based on
  783. the window width: it leaves a certain number of columns for the right
  784. margin.  The variable `enriched-default-right-margin' says how many
  785. columns.  The default value is 10.
  786.  
  787. 
  788. File: emacs,  Node: Format Justification,  Next: Format Properties,  Prev: Format Indentation,  Up: Formatted Text
  789.  
  790. Justification in Formatted Text
  791. -------------------------------
  792.  
  793.    When editing formatted text, you can specify various styles of
  794. justification for a paragraph.  The style you specify automatically
  795. affects the Emacs fill commands.
  796.  
  797.    The Justification submenu provides a convenient interface for
  798. specifying the style.  The submenu contains five items:
  799.  
  800. `Flush Left'
  801.      This is the most common style of justification (at least for
  802.      English).  Lines are aligned at the left margin but left uneven at
  803.      the right.
  804.  
  805. `Flush Right'
  806.      This aligns each line with the right margin.  Spaces and tabs are
  807.      added on the left, if necessary, to make lines line up on the
  808.      right.
  809.  
  810. `Full'
  811.      This justifies the text, aligning both edges of each line.
  812.      Justified text looks very nice in a printed book, where the spaces
  813.      can all be adjusted equally, but it does not look as nice with a
  814.      fixed-width font on the screen.  Perhaps a future version of Emacs
  815.      will be able to adjust the width of spaces in a line to achieve
  816.      elegant justification.
  817.  
  818. `Center'
  819.      This centers every line between the current margins.
  820.  
  821. `None'
  822.      This turns off filling entirely.  Each line will remain as you
  823.      wrote it; the fill and auto-fill functions will have no effect on
  824.      text which has this setting.  You can, however, still indent the
  825.      left margin.  In unfilled regions, all newlines are treated as
  826.      hard newlines (*note Hard and Soft Newlines::.) .
  827.  
  828.    In Enriched mode, you can also specify justification from the
  829. keyboard using the `M-j' prefix character:
  830.  
  831. `M-j l'
  832.      Make the region left-filled (`set-justification-left').
  833.  
  834. `M-j r'
  835.      Make the region right-filled (`set-justification-right').
  836.  
  837. `M-j f'
  838.      Make the region fully-justified (`set-justification-full').
  839.  
  840. `M-j c'
  841. `M-S'
  842.      Make the region centered (`set-justification-center').
  843.  
  844. `M-j u'
  845.      Make the region unfilled (`set-justification-none').
  846.  
  847.    Justification styles apply to entire paragraphs.  All the
  848. justification-changing commands operate on the paragraph containing
  849. point, or, if the region is active, on all paragraphs which overlap the
  850. region.
  851.  
  852.    The default justification style is specified by the variable
  853. `default-justification'.  Its value should be one of the symbols
  854. `left', `right', `full', `center', or `none'.
  855.  
  856. 
  857. File: emacs,  Node: Format Properties,  Next: Forcing Enriched Mode,  Prev: Format Justification,  Up: Formatted Text
  858.  
  859. Setting Other Text Properties
  860. -----------------------------
  861.  
  862.    The Other Properties menu lets you add or remove three other useful
  863. text properties: `read-only', `invisible' and `intangible'.  The
  864. `intangible' property disallows moving point within the text, the
  865. `invisible' text property hides text from display, and the `read-only'
  866. property disallows alteration of the text.
  867.  
  868.    Each of these special properties has a menu item to add it to the
  869. region.  The last menu item, `Remove Special', removes all of these
  870. special properties from the text in the region.
  871.  
  872.    Currently, the `invisible' and `intangible' properties are *not*
  873. saved in the text/enriched format.  The `read-only' property is saved,
  874. but it is not a standard part of the text/enriched format, so other
  875. editors may not respect it.
  876.  
  877. 
  878. File: emacs,  Node: Forcing Enriched Mode,  Prev: Format Properties,  Up: Formatted Text
  879.  
  880. Forcing Enriched Mode
  881. ---------------------
  882.  
  883.    Normally, Emacs knows when you are editing formatted text because it
  884. recognizes the special annotations used in the file that you visited.
  885. However, there are situations in which you must take special actions to
  886. convert file contents or turn on Enriched mode:
  887.  
  888.    * When you visit a file that was created with some other editor,
  889.      Emacs may not recognize the file as being in the text/enriched
  890.      format.  In this case, when you visit the file you will see the
  891.      formatting commands rather than the formatted text.  Type `M-x
  892.      format-decode-buffer' to translate it.
  893.  
  894.    * When you *insert* a file into a buffer, rather than visiting it.
  895.      Emacs does the necessary conversions on the text which you insert,
  896.      but it does not enable Enriched mode.  If you wish to do that,
  897.      type `M-x enriched-mode'.
  898.  
  899.    The command `format-decode-buffer' translates text in various
  900. formats into Emacs's internal format.  It asks you to specify the format
  901. to translate from; however, normally you can type just RET, which tells
  902. Emacs to guess the format.
  903.  
  904.    If you wish to look at a file in text/enriched format in its raw
  905. form, as a sequence of characters with no formatting, use `M-x
  906. format-find-file RET FILENAME RET RET'.  The empty second argument
  907. means, "read without format conversion."
  908.  
  909. 
  910. File: emacs,  Node: Programs,  Next: Building,  Prev: Text,  Up: Top
  911.  
  912. Editing Programs
  913. ****************
  914.  
  915.    Emacs has many commands designed to understand the syntax of
  916. programming languages such as Lisp and C.  These commands can
  917.  
  918.    * Move over or kill balanced expressions or "sexps" (*note Lists::.).
  919.  
  920.    * Move over or mark top-level expressions--"defuns", in Lisp;
  921.      functions, in C (*note Defuns::.).
  922.  
  923.    * Show how parentheses balance (*note Matching::.).
  924.  
  925.    * Insert, kill or align comments (*note Comments::.).
  926.  
  927.    * Follow the usual indentation conventions of the language (*note
  928.      Program Indent::.).
  929.  
  930.    The commands for words, sentences and paragraphs are very useful in
  931. editing code even though their canonical application is for editing
  932. human language text.  Most symbols contain words (*note Words::.);
  933. sentences can be found in strings and comments (*note Sentences::.).
  934. Paragraphs per se don't exist in code, but the paragraph commands are
  935. useful anyway, because programming language major modes define
  936. paragraphs to begin and end at blank lines (*note Paragraphs::.).
  937. Judicious use of blank lines to make the program clearer will also
  938. provide useful chunks of text for the paragraph commands to work on.
  939.  
  940.    The selective display feature is useful for looking at the overall
  941. structure of a function (*note Selective Display::.).  This feature
  942. causes only the lines that are indented less than a specified amount to
  943. appear on the screen.
  944.  
  945. * Menu:
  946.  
  947. * Program Modes::     Major modes for editing programs.
  948. * Lists::             Expressions with balanced parentheses.
  949. * List Commands::     The commands for working with list and sexps.
  950. * Defuns::            Each program is made up of separate functions.
  951.                         There are editing commands to operate on them.
  952. * Program Indent::    Adjusting indentation to show the nesting.
  953. * Matching::          Insertion of a close-delimiter flashes matching open.
  954. * Comments::          Inserting, killing, and aligning comments.
  955. * Balanced Editing::  Inserting two matching parentheses at once, etc.
  956. * Symbol Completion:: Completion on symbol names of your program or language.
  957. * Documentation::     Getting documentation of functions you plan to call.
  958. * Change Log::        Maintaining a change history for your program.
  959. * Tags::              Go direct to any function in your program in one
  960.                         command.  Tags remembers which file it is in.
  961. * Emerge::          A convenient way of merging two versions of a program.
  962. * C Mode::          Special commands of C mode (and C++ mode).
  963. * Fortran::          Fortran mode and its special features.
  964. * Asm Mode::          Asm mode and its special features.
  965.  
  966. 
  967. File: emacs,  Node: Program Modes,  Next: Lists,  Up: Programs
  968.  
  969. Major Modes for Programming Languages
  970. =====================================
  971.  
  972.    Emacs also has major modes for the programming languages Lisp, Scheme
  973. (a variant of Lisp), Awk, C, C++, Fortran, Icon, Pascal, Perl and Tcl.
  974. There is also a major mode for makefiles, called Makefile mode.
  975.  
  976.    Ideally, a major mode should be implemented for each programming
  977. language that you might want to edit with Emacs; but often the mode for
  978. one language can serve for other syntactically similar languages.  The
  979. language modes that exist are those that someone decided to take the
  980. trouble to write.
  981.  
  982.    There are several forms of Lisp mode, which differ in the way they
  983. interface to Lisp execution.  *Note Executing Lisp::.
  984.  
  985.    Each of the programming language modes defines the TAB key to run an
  986. indentation function that knows the indentation conventions of that
  987. language and updates the current line's indentation accordingly.  For
  988. example, in C mode TAB is bound to `c-indent-line'.  LFD is normally
  989. defined to do RET followed by TAB; thus, it too indents in a
  990. mode-specific fashion.
  991.  
  992.    In most programming languages, indentation is likely to vary from
  993. line to line.  So the major modes for those languages rebind DEL to
  994. treat a tab as if it were the equivalent number of spaces (using the
  995. command `backward-delete-char-untabify').  This makes it possible to
  996. rub out indentation one column at a time without worrying whether it is
  997. made up of spaces or tabs.  Use `C-b C-d' to delete a tab character
  998. before point, in these modes.
  999.  
  1000.    Programming language modes define paragraphs to be separated only by
  1001. blank lines, so that the paragraph commands remain useful.  Auto Fill
  1002. mode, if enabled in a programming language major mode, indents the new
  1003. lines which it creates.
  1004.  
  1005.    Turning on a major mode runs a normal hook called the "mode hook",
  1006. which is the value of a Lisp variable.  Each major mode has a mode hook,
  1007. and the hook's name is always made from the mode command's name by
  1008. adding `-hook'.  For example, turning on C mode runs the hook
  1009. `c-mode-hook', while turning on Lisp mode runs the hook
  1010. `lisp-mode-hook'.  *Note Hooks::.
  1011.  
  1012. 
  1013. File: emacs,  Node: Lists,  Next: List Commands,  Prev: Program Modes,  Up: Programs
  1014.  
  1015. Lists and Sexps
  1016. ===============
  1017.  
  1018.    By convention, Emacs keys for dealing with balanced expressions are
  1019. usually Control-Meta characters.  They tend to be analogous in function
  1020. to their Control and Meta equivalents.  These commands are usually
  1021. thought of as pertaining to expressions in programming languages, but
  1022. can be useful with any language in which some sort of parentheses exist
  1023. (including human languages).
  1024.  
  1025.    These commands fall into two classes.  Some deal only with "lists"
  1026. (parenthetical groupings).  They see nothing except parentheses,
  1027. brackets, braces (whichever ones must balance in the language you are
  1028. working with), and escape characters that might be used to quote those.
  1029.  
  1030.    The other commands deal with expressions or "sexps".  The word `sexp'
  1031. is derived from "s-expression", the ancient term for an expression in
  1032. Lisp.  But in Emacs, the notion of `sexp' is not limited to Lisp.  It
  1033. refers to an expression in whatever language your program is written in.
  1034. Each programming language has its own major mode, which customizes the
  1035. syntax tables so that expressions in that language count as sexps.
  1036.  
  1037.    Sexps typically include symbols, numbers, and string constants, as
  1038. well as anything contained in parentheses, brackets or braces.
  1039.  
  1040.    In languages that use prefix and infix operators, such as C, it is
  1041. not possible for all expressions to be sexps.  For example, C mode does
  1042. not recognize `foo + bar' as a sexp, even though it *is* a C expression;
  1043. it recognizes `foo' as one sexp and `bar' as another, with the `+' as
  1044. punctuation between them.  This is a fundamental ambiguity: both `foo +
  1045. bar' and `foo' are legitimate choices for the sexp to move over if
  1046. point is at the `f'.  Note that `(foo + bar)' is a single sexp in C
  1047. mode.
  1048.  
  1049.    Some languages have obscure forms of expression syntax that nobody
  1050. has bothered to make Emacs understand properly.
  1051.  
  1052. 
  1053. File: emacs,  Node: List Commands,  Next: Defuns,  Prev: Lists,  Up: Programs
  1054.  
  1055. List And Sexp Commands
  1056. ======================
  1057.  
  1058. `C-M-f'
  1059.      Move forward over a sexp (`forward-sexp').
  1060.  
  1061. `C-M-b'
  1062.      Move backward over a sexp (`backward-sexp').
  1063.  
  1064. `C-M-k'
  1065.      Kill sexp forward (`kill-sexp').
  1066.  
  1067. `C-M-DEL'
  1068.      Kill sexp backward (`backward-kill-sexp').
  1069.  
  1070. `C-M-u'
  1071.      Move up and backward in list structure (`backward-up-list').
  1072.  
  1073. `C-M-d'
  1074.      Move down and forward in list structure (`down-list').
  1075.  
  1076. `C-M-n'
  1077.      Move forward over a list (`forward-list').
  1078.  
  1079. `C-M-p'
  1080.      Move backward over a list (`backward-list').
  1081.  
  1082. `C-M-t'
  1083.      Transpose expressions (`transpose-sexps').
  1084.  
  1085. `C-M-@'
  1086.      Put mark after following expression (`mark-sexp').
  1087.  
  1088.    To move forward over a sexp, use `C-M-f' (`forward-sexp').  If the
  1089. first significant character after point is an opening delimiter (`(' in
  1090. Lisp; `(', `[' or `{' in C), `C-M-f' moves past the matching closing
  1091. delimiter.  If the character begins a symbol, string, or number,
  1092. `C-M-f' moves over that.
  1093.  
  1094.    The command `C-M-b' (`backward-sexp') moves backward over a sexp.
  1095. The detailed rules are like those above for `C-M-f', but with
  1096. directions reversed.  If there are any prefix characters (single-quote,
  1097. backquote and comma, in Lisp) preceding the sexp, `C-M-b' moves back
  1098. over them as well.  The sexp commands move across comments as if they
  1099. were whitespace in most modes.
  1100.  
  1101.    `C-M-f' or `C-M-b' with an argument repeats that operation the
  1102. specified number of times; with a negative argument, it moves in the
  1103. opposite direction.
  1104.  
  1105.    Killing a sexp at a time can be done with `C-M-k' (`kill-sexp') or
  1106. `C-M-DEL' (`backward-kill-sexp').  `C-M-k' kills the characters that
  1107. `C-M-f' would move over, and `C-M-DEL' kills the characters that
  1108. `C-M-b' would move over.
  1109.  
  1110.    The "list commands" move over lists like the sexp commands but skip
  1111. blithely over any number of other kinds of sexps (symbols, strings,
  1112. etc).  They are `C-M-n' (`forward-list') and `C-M-p' (`backward-list').
  1113. The main reason they are useful is that they usually ignore comments
  1114. (since the comments usually do not contain any lists).
  1115.  
  1116.    `C-M-n' and `C-M-p' stay at the same level in parentheses, when
  1117. that's possible.  To move *up* one (or N) levels, use `C-M-u'
  1118. (`backward-up-list').  `C-M-u' moves backward up past one unmatched
  1119. opening delimiter.  A positive argument serves as a repeat count; a
  1120. negative argument reverses direction of motion and also requests
  1121. repetition, so it moves forward and up one or more levels.
  1122.  
  1123.    To move *down* in list structure, use `C-M-d' (`down-list').  In
  1124. Lisp mode, where `(' is the only opening delimiter, this is nearly the
  1125. same as searching for a `('.  An argument specifies the number of levels
  1126. of parentheses to go down.
  1127.  
  1128.    A somewhat random-sounding command which is nevertheless handy is
  1129. `C-M-t' (`transpose-sexps'), which drags the previous sexp across the
  1130. next one.  An argument serves as a repeat count, and a negative
  1131. argument drags backwards (thus canceling out the effect of `C-M-t' with
  1132. a positive argument).  An argument of zero, rather than doing nothing,
  1133. transposes the sexps ending after point and the mark.
  1134.  
  1135.    To set the region around the next sexp in the buffer, use `C-M-@'
  1136. (`mark-sexp'), which sets mark at the same place that `C-M-f' would
  1137. move to.  `C-M-@' takes arguments like `C-M-f'.  In particular, a
  1138. negative argument is useful for putting the mark at the beginning of
  1139. the previous sexp.
  1140.  
  1141.    The list and sexp commands' understanding of syntax is completely
  1142. controlled by the syntax table.  Any character can, for example, be
  1143. declared to be an opening delimiter and act like an open parenthesis.
  1144. *Note Syntax::.
  1145.  
  1146.